import requests


def run(url):
    headers = {
        'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36',
        # 'Referer': 'https://xueqiu.com/',
        'Cookie': '_ga=GA1.2.678144559.1555391372; device_id=2c34e96b00dad81bebc9df8ce0729835; aliyungf_tc=AQAAABs4Um8jPg8A6KFyqzEpAme4y8Fi; xq_a_token=363aa481eb7c8b5ec33a22dad82f9b50a811a76d; xq_a_token.sig=-IsDKkHnatxXFjssWaGxDZ4FLsg; xq_r_token=6982254134692e2b8e4ecda2e571b3a01d723e5f; xq_r_token.sig=yITO4PkYzpoSN9Y9BtE1h19RPDo; _gid=GA1.2.1416988890.1556712979; u=831556712979587; Hm_lvt_1db88642e346389874251b5a1eded6e3=1555397274,1555901898,1556712980,1556713012; _gat=1; Hm_lpvt_1db88642e346389874251b5a1eded6e3=1556713178'
    }
    response = requests.get(url, headers=headers)
    print(response.text)


if __name__ == '__main__':
    url = 'https://xueqiu.com/v4/statuses/public_timeline_by_category.json?since_id=-1&max_id=-1&count=10&category=111'
    run(url)